<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 大括号里只能包含单个表达式 -->
        <h2>{{msg}}</h2>
        <!-- <h2>{{msg num}}</h2> -->
        <h2>{{msg + num}}</h2>
        <h2>{{arr[1]}}</h2>
        <h2>{{user.name}}</h2>
    </div>
    <script src="../vue.js"></script>
    <script>
        //创建vue实例
        var vm = new Vue({
            data:{
                msg:"字符串",
                arr:["雷浪","RH","梦缘","123"],
                num:1,
                num2:2,
                user:{
                    name:"肖雅涵",
                    age:"18"
                }
            }
        }).$mount("#app");//挂载元素
    </script>
</body>
</html>


